package com.example.service;

import com.example.domain.Blog;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface BlogService {
    //新增和修改
    public boolean insert(Blog blog);
    //查询一个
    public Blog selectOne(Long id);
    //分页查询多个
    public Page<Blog> selectBlogPage(Pageable pageable, Blog blog);
    //id删除
    public boolean deleteById(Long id);
    //根据id查询
    public Blog selectOneId(Long id);
    //根据推荐是否更新时间排序分页查询
    public Page<Blog> gainBlogPage(Pageable pageable, Blog blog);
    //归档页时间查询
    public List<Blog> findAllByCreateTimeLike();
    //全文搜索方法
    public Page<Blog> findByQuery(String query,int currentPage,int pageSize);
}
